{% extends "base_edit.html" %}

{% load i18n %}
{% load breadcrumbs %}
{% load details %}

{% block breadcrumbs %}
    {% add_crumb 'Home' '/' %}
    {% add_crumb 'Widgets' %}
    {% if object.pk %}
    {% add_crumb object.title object.get_absolute_url %}
    {% add_crumb 'Edit' %}
    {% else %}
    {% add_crumb 'Add' %}
    {% endif %}
{% endblock %}

{% block editform %}
<table class="properties">
    {% property_table form "['title', ['template', 'context']]" %}
</table>
{% endblock %}


{% block buttons %}
<span class="submit"><input title="{% trans 'Confirm' %}" type="submit" value="{% trans "Save" %}" /></span>
{% with index=request.path|slice:':-1'|split:'/'|slice:':-1'|join:'/' absolute_url=object.get_absolute_url %}
<span class="cancel"><a title="{% trans 'Cancel' %}" href="{{ next|default:absolute_url|default:index }}">{% trans "Cancel" %}</a></span>
{% endwith %}
{% endblock %}
